/**
 * @param {number[]} g
 * @param {number[]} s
 * @return {number}
 */
 var findContentChildren = function (g, s) {
    const sortNew = (a, b) => {
      return a - b
    }
    g.sort(sortNew)
    s.sort(sortNew)
    let i = 0
    s.map(e => {
      if (e >= g[i]) {
        i++
      }
    })
    return i
  };